<?php

namespace app\modules\v1\models;

use Yii;

/**
 * This is the model class for table "{{%_usermoneyrecord}}".
 *
 * @property integer $id
 * @property integer $oid
 * @property string $telephone
 * @property string $status
 * @property double $money
 * @property string $createdate
 */
class Usermoneyrecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%_usermoneyrecord}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['oid', 'telephone', 'status', 'money'], 'required','message' => 401],
            [['oid'], 'unique', 'message' => 402],
            [['money', 'oid'], 'integer', 'message' => 403],
            [['telephone'], 'string', 'length' => [11,11], 'tooShort' => 403, 'tooLong' => 403],
            [['status'], 'string', 'max' => 8],
            [['createdate'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'oid' => 'OID',
            'telephone' => 'Telephone',
            'status' => 'Status',
            'money' => 'Money',
            'createdate' => 'Createdate',
        ];
    }
}
